package com.base;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

/**
 * 开发公司：个人
 * 版权：个人
 * <p>
 * Application
 * @SpringBootApplication(scanBasePackages = {"com.base"})  scanBasePackages 扫描基础类包
 * @ServletComponentScan(basePackages = {"com.base"}) 扫描服务程序组件 （@WebServlet、@WebFilter、@WebListener等注解注解）
 * 启用@ServletComponentScan 注解后 Servlet、Filter、Listener可以直接通过@WebServlet、@WebFilter、@WebListener注解自动注册，无需其他代码。
  * @author 刘志强
 * @created Create Time: 2019/5/23
 */
@SpringBootApplication(scanBasePackages = {"com.base"})
@ServletComponentScan(basePackages = {"com.base"})
public class Application  implements CommandLineRunner {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Override
    public void run(String... strings) throws Exception {
        logger.info("程序启动");
    }
}